import { ApolloQueryResult, FetchResult, FetchPolicy } from '@apollo/client/core';
import { Observable } from 'rxjs';
/**************************************************************************************
 * 资源操作日志
 */
/*************************************************************************************
 * 服务接口定义
 */
export interface NamesOperatorRecordServiceApi {
  list(variables: NamesOperatorRecordService_listVariables, options:NamesOperatorRecordServiceQueryOptions): Observable<ApolloQueryResult<NamesOperatorRecordService_listResult>>; // 分页查询
  totalCount(): Observable<ApolloQueryResult<NamesOperatorRecordService_totalCountResult>>; // 统计库中所有对象的数据量
  search(variables: NamesOperatorRecordService_searchVariables, options:NamesOperatorRecordServiceQueryOptions): Observable<ApolloQueryResult<NamesOperatorRecordService_searchResult>>; // 游标查询
  loadAll(): Observable<ApolloQueryResult<NamesOperatorRecordService_loadAllResult>>; // 获取库中所有数据，数据量大时请谨慎使用
  getById(variables: NamesOperatorRecordService_getByIdVariables, options:NamesOperatorRecordServiceQueryOptions): Observable<ApolloQueryResult<NamesOperatorRecordService_getByIdResult>>; // 获取一个对象
  addRecord(variables: NamesOperatorRecordService_addRecordVariables): Observable<FetchResult<NamesOperatorRecordService_addRecordResult>>; // 添加操作日志
  save(variables: NamesOperatorRecordService_saveVariables): Observable<FetchResult<NamesOperatorRecordService_saveResult>>; // 保存对象
  removeById(variables: NamesOperatorRecordService_removeByIdVariables): Observable<FetchResult<NamesOperatorRecordService_removeByIdResult>>; // 删除一个对象
  removeByIdList(variables: NamesOperatorRecordService_removeByIdListVariables): Observable<FetchResult<NamesOperatorRecordService_removeByIdListResult>>; // 删除一批对象
}
export interface NamesOperatorRecordServiceQueryOptions{
  cachePolicy:FetchPolicy;
  more:boolean;
}

/**
 * 分页查询
 */
export interface NamesOperatorRecordService_listResult{
    namesOperatorRecordService_list: NamesOperatorRecordConnection;
}
export interface NamesOperatorRecordService_listVariables{
      filter: NamesOperatorRecordFilter; // 过滤条件
      orderBy?: NamesOperatorRecordOrderBy; // 排序方式
}

/**
 * 统计库中所有对象的数据量
 */
export interface NamesOperatorRecordService_totalCountResult{
    namesOperatorRecordService_totalCount: number;
}

/**
 * 游标查询
 */
export interface NamesOperatorRecordService_searchResult{
    namesOperatorRecordService_search: NamesOperatorRecordConnection;
}
export interface NamesOperatorRecordService_searchVariables{
      first: number; // 获取数据量
      offset: number; // 获取数据起始位置
      filter: NamesOperatorRecordFilter; // 过滤条件
      orderBy?: NamesOperatorRecordOrderBy; // 排序方式
}

/**
 * 获取库中所有数据，数据量大时请谨慎使用
 */
export interface NamesOperatorRecordService_loadAllResult{
    namesOperatorRecordService_loadAll: NamesOperatorRecordConnection;
}

/**
 * 获取一个对象
 */
export interface NamesOperatorRecordService_getByIdResult{
    namesOperatorRecordService_getById: NamesOperatorRecordPackage;
}
export interface NamesOperatorRecordService_getByIdVariables{
      id: string; // 对象的ID值
}


export interface NamesOperatorRecordService_addRecordResult{
  namesOperatorRecordService_addRecord: NamesOperatorRecordMutationInfo;
}

/**
 * 添加操作日志
 */
export interface NamesOperatorRecordService_addRecordVariables{
    path: string; // 资源路径
    'MK_DIRS' | 'REMOVE_DIR' | 'RENAME_DIR' | 'UPLOAD' | 'MOVE_TO_RECYCLE_BIN' | 'CLEAN_RECYCLE_BIN' | 'REMOVE_FILE' | 'RENAME_FILE' | 'SHARE_FILE'; // 操作类型
}

export interface NamesOperatorRecordService_saveResult{
  namesOperatorRecordService_save: NamesOperatorRecordMutationInfo;
}

/**
 * 保存对象
 */
export interface NamesOperatorRecordService_saveVariables{
    entity: NamesOperatorRecordInput; // 保存对象，无id值新增，有id值修改，如果修改未找到对象则抛出异常修改失败
}

export interface NamesOperatorRecordService_removeByIdResult{
  namesOperatorRecordService_removeById: NamesOperatorRecordMutationInfo;
}

/**
 * 删除一个对象
 */
export interface NamesOperatorRecordService_removeByIdVariables{
    id: string; // 对象ID值
}

export interface NamesOperatorRecordService_removeByIdListResult{
  namesOperatorRecordService_removeByIdList: NamesOperatorRecordMutationInfo;
}

/**
 * 删除一批对象
 */
export interface NamesOperatorRecordService_removeByIdListVariables{
    ids: string[]; // 对象ID值列表
}
/**
 * 错误信息
 */
export interface NamesOperatorRecordErrorBody {
  message: string;
  stackTrace: string;
}

/**
 * 查询结果信息
 */
export interface NamesOperatorRecordResultInfo {
  totalCount: number;
  queryTime: number;
  sign: string;
  message: string;
}

/**
 * 分页信息
 */
export interface NamesOperatorRecordPageInfo{
  page: number;
  size: number;
  offset: number;
  endCursor: string;
  hasNextPage: boolean;
}

/**
 * 查询集合返回对象
 */
export interface  NamesOperatorRecordConnection{
  resultInfo: NamesOperatorRecordResultInfo;
  edges: NamesOperatorRecordViewEdge[];
  pageInfo: NamesOperatorRecordPageInfo;
  uuid: string;
}
export interface NamesOperatorRecordViewEdge{
  node:NamesOperatorRecordView;
}
/**
 * 查询单个对象返回结果
 */
export interface NamesOperatorRecordPackage{
  resultInfo: NamesOperatorRecordResultInfo;
  entity: NamesOperatorRecordView;
  uuid: string;
}

/**
 * 排序类型
 */
export interface NamesOperatorRecordOrderBy {
  field: string;
  type: 'ASC' | 'DESC';
}

/**
 * 更新返回结果信息
 */
export interface NamesOperatorRecordMutationInfo {
  status: boolean;
  rows: number;
  messages: string;
  uuid: string;
  sign: string;
  executeTime: number;
  result: NamesOperatorRecordView;
}

/**
 * 字符串筛选接口
 */
export interface NamesOperatorRecordStringFilter {
  eq?: string;
  neq?: string;
  like?: string;
  in?: string[];
  nin?: string[];
  gt?: string;
  lt?: string;
  gte?: string;
  lte?: string;
}

/**
 * 数字过滤条件接口
 */
export interface NamesOperatorRecordNumberFilter {
  eq?: number;
  neq?: number;
  in?: number[];
  nin?: number[];
  gt?: number;
  lt?: number;
  gte?: number;
  lte?: number;
}

/**
 * 布尔类型删选接口
 */
export interface NamesOperatorRecordBooleanFilter {
  eq?: boolean;
  neq?: boolean;
}




/*****************************************************************************************
 * 查询接口
 */
export const namesOperatorRecordServiceQuery = {
   // 分页查询
  namesOperatorRecordService_list: `namesOperatorRecordService_list(filter:$filter,orderBy:$orderBy){
    resultInfo{
      totalCount
      queryTime
      sign
      message
    }
    edges{
      node{
      path
      operatorType
      ip
      body
      tenantId
      tenant
      tenantCode
      tenantName
      creator
      creatorId
      creatorCode
      creatorName
      createDateTime
      lastModifiedDateTime
      sortNum
      id
        }
    }
    pageInfo{
      page
      size
      offset
      hasNextPage
      endCursor
    }
    uuid
  }`
, // 统计库中所有对象的数据量
  namesOperatorRecordService_totalCount: `namesOperatorRecordService_totalCount`
, // 游标查询
  namesOperatorRecordService_search: `namesOperatorRecordService_search(first:$first,offset:$offset,filter:$filter,orderBy:$orderBy){
    resultInfo{
      totalCount
      queryTime
      sign
      message
    }
    edges{
      node{
      path
      operatorType
      ip
      body
      tenantId
      tenant
      tenantCode
      tenantName
      creator
      creatorId
      creatorCode
      creatorName
      createDateTime
      lastModifiedDateTime
      sortNum
      id
        }
    }
    pageInfo{
      page
      size
      offset
      hasNextPage
      endCursor
    }
    uuid
  }`
, // 获取库中所有数据，数据量大时请谨慎使用
  namesOperatorRecordService_loadAll: `namesOperatorRecordService_loadAll{
    resultInfo{
      totalCount
      queryTime
      sign
      message
    }
    edges{
      node{
      path
      operatorType
      ip
      body
      tenantId
      tenant
      tenantCode
      tenantName
      creator
      creatorId
      creatorCode
      creatorName
      createDateTime
      lastModifiedDateTime
      sortNum
      id
        }
    }
    pageInfo{
      page
      size
      offset
      hasNextPage
      endCursor
    }
    uuid
  }`
, // 获取一个对象
  namesOperatorRecordService_getById: `namesOperatorRecordService_getById(id:$id){
    resultInfo{
      totalCount
      queryTime
      sign
      message
    }
    entity{
      path
      operatorType
      ip
      body
      tenantId
      tenant
      tenantCode
      tenantName
      creator
      creatorId
      creatorCode
      creatorName
      createDateTime
      lastModifiedDateTime
      sortNum
      id
    }
    uuid
  }`
};

/*********************************************************************
 * 更新接口信息
 */
export const namesOperatorRecordServiceMutation = {
   // 添加操作日志
  namesOperatorRecordService_addRecord: `namesOperatorRecordService_addRecord(path:$path,operatorType:$operatorType){
    status
    rows
    messages
    uuid
    sign
    executeTime
    result{
      path
      operatorType
      ip
      body
      tenantId
      tenant
      tenantCode
      tenantName
      creator
      creatorId
      creatorCode
      creatorName
      createDateTime
      lastModifiedDateTime
      sortNum
      id
    }
    errorBody{
      message
      stackTrace
    }
  }`
, // 保存对象
  namesOperatorRecordService_save: `namesOperatorRecordService_save(entity:$entity){
    status
    rows
    messages
    uuid
    sign
    executeTime
    result{
      path
      operatorType
      ip
      body
      tenantId
      tenant
      tenantCode
      tenantName
      creator
      creatorId
      creatorCode
      creatorName
      createDateTime
      lastModifiedDateTime
      sortNum
      id
    }
    errorBody{
      message
      stackTrace
    }
  }`
, // 删除一个对象
  namesOperatorRecordService_removeById: `namesOperatorRecordService_removeById(id:$id){
    status
    rows
    messages
    uuid
    sign
    executeTime

    errorBody{
      message
      stackTrace
    }
  }`
, // 删除一批对象
  namesOperatorRecordService_removeByIdList: `namesOperatorRecordService_removeByIdList(ids:$ids){
    status
    rows
    messages
    uuid
    sign
    executeTime

    errorBody{
      message
      stackTrace
    }
  }`
};

/************************************************************************
 * 类型信息
 */
/**
 * 未提供
 */
export interface NamesOperatorRecordStore {
  path: string; // 路径
  operatorType?: 'MK_DIRS' | 'REMOVE_DIR' | 'RENAME_DIR' | 'UPLOAD' | 'MOVE_TO_RECYCLE_BIN' | 'CLEAN_RECYCLE_BIN' | 'REMOVE_FILE' | 'RENAME_FILE' | 'SHARE_FILE'; // 操作类型
  ip?: string; // 操作用户的IP地址
  body?: string; // 操作详细信息，包括操作系统、浏览器信息、网络信息等等
  tenantId?: string; // 租户ID
  tenant?: string; // 租户快照信息
  tenantCode?: string; // 租户编号
  tenantName?: string; // 租户名称
  creator?: string; // 创建人快照信息
  creatorId?: string; // 创建人ID
  creatorCode?: string; // 创建人账号
  creatorName?: string; // 创建人名称
  createDateTime?: number; // 创建时间
  lastModifiedDateTime?: number; // 最后修改时间
  sortNum?: number; // 默认排序字段
  id?: string; // 未说明
  [props: string]: any;
}
/**
 * 未提供
 */
export interface NamesOperatorRecordView {
  path: string; // 路径
  operatorType?: 'MK_DIRS' | 'REMOVE_DIR' | 'RENAME_DIR' | 'UPLOAD' | 'MOVE_TO_RECYCLE_BIN' | 'CLEAN_RECYCLE_BIN' | 'REMOVE_FILE' | 'RENAME_FILE' | 'SHARE_FILE'; // 操作类型
  ip?: string; // 操作用户的IP地址
  body?: string; // 操作详细信息，包括操作系统、浏览器信息、网络信息等等
  tenantId?: string; // 租户ID
  tenant?: string; // 租户快照信息
  tenantCode?: string; // 租户编号
  tenantName?: string; // 租户名称
  creator?: string; // 创建人快照信息
  creatorId?: string; // 创建人ID
  creatorCode?: string; // 创建人账号
  creatorName?: string; // 创建人名称
  createDateTime?: number; // 创建时间
  lastModifiedDateTime?: number; // 最后修改时间
  sortNum?: number; // 默认排序字段
  id?: string; // 未说明
  [props: string]: any;
}
/**
 * 未提供
 */
export interface NamesOperatorRecordInput {
  path: string; // 路径
  operatorType?: 'MK_DIRS' | 'REMOVE_DIR' | 'RENAME_DIR' | 'UPLOAD' | 'MOVE_TO_RECYCLE_BIN' | 'CLEAN_RECYCLE_BIN' | 'REMOVE_FILE' | 'RENAME_FILE' | 'SHARE_FILE'; // 操作类型
  ip?: string; // 操作用户的IP地址
  body?: string; // 操作详细信息，包括操作系统、浏览器信息、网络信息等等
  tenantId?: string; // 租户ID
  tenant?: string; // 租户快照信息
  tenantCode?: string; // 租户编号
  tenantName?: string; // 租户名称
  creator?: string; // 创建人快照信息
  creatorId?: string; // 创建人ID
  creatorCode?: string; // 创建人账号
  creatorName?: string; // 创建人名称
  createDateTime?: number; // 创建时间
  lastModifiedDateTime?: number; // 最后修改时间
  sortNum?: number; // 默认排序字段
  id?: string; // 未说明
  [props: string]: any;
}
/**
 * 未提供
 */
export interface NamesOperatorRecordFilter {
  path?: NamesOperatorRecordStringFilter; // 路径
  operatorType?: NamesOperatorRecordStringFilter; // 操作类型
  ip?: NamesOperatorRecordStringFilter; // 操作用户的IP地址
  body?: NamesOperatorRecordStringFilter; // 操作详细信息，包括操作系统、浏览器信息、网络信息等等
  tenantId?: NamesOperatorRecordStringFilter; // 租户ID
  tenant?: NamesOperatorRecordStringFilter; // 租户快照信息
  tenantCode?: NamesOperatorRecordStringFilter; // 租户编号
  tenantName?: NamesOperatorRecordStringFilter; // 租户名称
  creator?: NamesOperatorRecordStringFilter; // 创建人快照信息
  creatorId?: NamesOperatorRecordStringFilter; // 创建人ID
  creatorCode?: NamesOperatorRecordStringFilter; // 创建人账号
  creatorName?: NamesOperatorRecordStringFilter; // 创建人名称
  createDateTime?: NamesOperatorRecordNumberFilter; // 创建时间
  lastModifiedDateTime?: NamesOperatorRecordNumberFilter; // 最后修改时间
  sortNum?: NamesOperatorRecordNumberFilter; // 默认排序字段
  id?: NamesOperatorRecordStringFilter; // 未说明
  [props: string]: any;
}
